<template>
 <div class="container">
   <Category title="美食">
    <img slot="center" src="https://cn.vuejs.org/images/logo.svg" alt="">
    <a slot="footer" href="https://cn.vuejs.org/">更多美食</a>
   </Category>
   <Category title="游戏">
     <ul slot="center">
       <li v-for="(item, index) in games" :key="index">{{item}}</li>
     </ul>
      <div class="foot" slot="footer">
      <a href="https://cn.vuejs.org/">单机游戏</a>
      <a href="https://cn.vuejs.org/">网络游戏</a>
      </div>
   </Category>
   <Category title="电影">
     <video slot="center" controls src="http://vjs.zencdn.net/v/oceans.mp4"></video>
     <!-- v-slot 只能与template 搭配使用 -->
     <template v-slot:footer>
       <div class="foot">
         <a href="https://cn.vuejs.org/">经典</a>
        <a href="https://cn.vuejs.org/">热门</a>
        <a href="https://cn.vuejs.org/">推荐</a>
       </div>
       <h4>欢迎前来观影！</h4>
     </template>
   </Category>
 </div>
</template>

<script>
import Category from './components/Category'

export default {
  name: "App",
  components: {Category},
  data() {
    return {
      foots: ['火锅', '烧烤', '小龙虾', '牛排'],
      games: ['红色警戒', '穿越火线', '劲舞团', '超级玛丽'],
      films: ['《教父》', '《拆弹专家》', '《你好，李焕英》', '《金刚》']
    }
  },
  methods: {
    
  }
}
</script>
<style lang="css" scoped>
.container, .foot {
  padding: 20px;
  display: flex;
  justify-content: space-around;
}  
h4 {
  text-align: center;
}
/* 插槽中的样式可以在这个里面定义，也可以在Category组件中定义 */
/* img, video {
  width: 100%;
} */
</style>
